import { createRouter, createWebHashHistory } from 'vue-router'
import Home from "../views/home/home.vue"
import Test from "../views/test/test.vue"
import VideoTest from "../views/test/video-test.vue"
import FilePath from "../views/test/filepath.vue"
import DragUpload from "../views/test/drag-upload.vue"
const routes = [
    // Project routes
    {
        path: '/', component: Home, children: [
            {
                path: 'video',
                name: 'video',
                component: () => import('../views/home/stage/video.vue')
            }, {
                path: '/chapter',
                name: 'chapter',
                component: () => import('../views/home/stage/chapter.vue'),
            }, 
            {
                    path: '/chapter/video',
                    name: 'chapter.video',
                    component: () => import('../views/home/stage/chapter/video.vue')
            },
            {
                path: 'course',
                name: 'course',
                component: () => import('../views/home/stage/course.vue')
            },
            {
                    path: '/course/chapter/video',
                    name: 'course.chapter.video',
                    component: () => import('../views/home/stage/course/video.vue')
            },
                        {
                    path: '/course/chapter',
                    name: 'course.chapter',
                    component: () => import('../views/home/stage/course/chapter.vue')
            },
            {
                path: '/video/detail',
                name: 'video-detail',
                component: () => import('../views/home/stage/video/video-detail.vue')
            }, {
                path: 'upload',
                name: 'upload',
                component: () => import('../views/home/stage/upload.vue')
            }, {
                path: 'set',
                name: 'set',
                component: () => import('../views/home/stage/set.vue')
            }, {
                path: 'test/fm',
                component: () => import('../views/test/file-manager/file-manager.vue')
            }
        ]
    },
    // { path: '/video-detail', component: VideoDetail },
    // Test routes
    { path: '/test', component: Test },
    { path: '/video-test', component: VideoTest },
    { path: '/file-path', component: FilePath },
    { path: '/drag-upload', component: DragUpload },
]

const router = createRouter({
    history: createWebHashHistory(),
    routes: routes
})

export default router